Include a header file required for build on mac 10.4
[supercollider.git] / Help / Extending and Customizing SC / Helper / AutoClassHelper.html
blob0fcef1b94d80f649430ac5a8d914ea81817280a2
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta http-equiv="Content-Style-Type" content="text/css">
6 <title></title>
7 <meta name="Generator" content="Cocoa HTML Writer">
8 <meta name="CocoaVersion" content="824.44">
9 <style type="text/css">
10 p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
11 p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
12 p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; min-height: 12.0px}
13 p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
14 p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #883120; min-height: 12.0px}
15 p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #883120}
16 p.p7 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; min-height: 12.0px}
17 p.p8 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica}
18 p.p9 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 12.0px Helvetica; min-height: 14.0px}
19 p.p10 {margin: 0.0px 0.0px 0.0px 85.0px; text-indent: -85.0px; font: 12.0px Helvetica}
20 p.p11 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #8c3b28}
21 p.p12 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #0f28af}
22 p.p13 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 9.0px Monaco; color: #883120}
23 p.p14 {margin: 0.0px 0.0px 0.0px 57.0px; text-indent: -57.0px; font: 14.0px Helvetica}
24 p.p15 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #8c3b28}
25 p.p16 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #0f28af}
26 span.s1 {font: 18.0px Helvetica}
27 span.s2 {color: #1335ea}
28 span.s3 {font: 9.0px Monaco; color: #883120}
29 span.s4 {color: #000000}
30 span.s5 {color: #883120}
31 span.Apple-tab-span {white-space:pre}
32 </style>
33 </head>
34 <body>
35 <p class="p1"><span class="s1"><b>AutoClassHelper<span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b></span><b>autogeneration of help files from source code markup</b><span class="s1"><b><span class="Apple-tab-span"> </span></b></span></p>
36 <p class="p2"><br></p>
37 <p class="p1"><b>Inherits from: Object</b></p>
38 <p class="p3"><br></p>
39 <p class="p1">AutoClassHelper generates an help file following the help template by analyzing the source code of the passed class (e.g. like Doxygen). This is possible by using a special markup syntax in the source code. It works only for classes. In fact, UGens require a much simpler help file and the mechanism does not make sense for Topics: in those cases you can simply use <b>Helper</b>.</p>
40 <p class="p2"><br></p>
41 <p class="p1"><b>See also:</b> <a href="Helper.html"><span class="s2">Helper</span></a></p>
42 <p class="p2"><br></p>
43 <p class="p4"><b>Some Important Issues Regarding AutoClassHelper</b></p>
44 <p class="p2"><br></p>
45 <p class="p1">AutoHelper is still experimental and you should use it following strictly the syntax examples and explanations provided in the source code of the fake test class <b>AutoClassHelperTest</b>. In order to understand what follows you should open its class definition. You see that the markup tag is a special multiline comment:<span class="Apple-converted-space"> </span></p>
46 <p class="p5"><br></p>
47 <p class="p6">/*@</p>
48 <p class="p6">infos here</p>
49 <p class="p6">@*/</p>
50 <p class="p5"><br></p>
51 <p class="p1">Each class can receive a class description (after its name) where all the infos required by class help template can be filled in by a specific tag (e.g. <span class="s3">shortDesc</span>) followed by <span class="s3">:</span>. In the class field you also describe var and classvars. one for each line (e.g. <span class="s3">classtestvar</span>)<span class="Apple-converted-space">  </span>followed by <span class="s3">:</span>.</p>
52 <p class="p5"><br></p>
53 <p class="p6">// After class name you can write</p>
54 <p class="p6">/*@</p>
55 <p class="p6">shortDesc: description of the method</p>
56 <p class="p6">longDesc: longer one</p>
57 <p class="p6">seeAlso: refs</p>
58 <p class="p6">issues: other aspects</p>
59 <p class="p6">testvar: a name of a instance var</p>
60 <p class="p6">classtestvar: a name of a class var</p>
61 <p class="p6">instDesc: the name of the instance methods section</p>
62 <p class="p6">longInstDesc: a comment related to the instance methods section</p>
63 <p class="p6">@*/</p>
64 <p class="p6">//</p>
65 <p class="p2"><br></p>
66 <p class="p1">Then each method can be marked up with a description of functionality, followed by a description of each argument. Then, multiline examples can be inserted.<span class="Apple-converted-space"> </span></p>
67 <p class="p2"><br></p>
68 <p class="p6">// After each method you can write</p>
69 <p class="p6">/*@</p>
70 <p class="p6">desc: a description of the method</p>
71 <p class="p6">argName: for each arg. Default value is added automatically</p>
72 <p class="p6">ex: multiline example</p>
73 <p class="p6">@*/</p>
74 <p class="p2"><br></p>
75 <p class="p1">See <b>AutoClassHelperTest</b> source.</p>
76 <p class="p1">Note that more typically you simply pass the item to the makeAutoHelp method of Help class (see Examples below).</p>
77 <p class="p2"><br></p>
78 <p class="p4"><b>Creation / Class Methods</b></p>
79 <p class="p7"><br></p>
80 <p class="p8"><b><span class="Apple-tab-span"> </span>*new (undocumentedClass, path)</b></p>
81 <p class="p9"><b><span class="Apple-tab-span"> </span></b></p>
82 <p class="p8"><b><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></b>The only method implemented by AutoClassHelper, it generates an help file.</p>
83 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>undocumentedClass </b>- the class to be documented. Default value is nil.<span class="Apple-converted-space"> </span></p>
84 <p class="p10"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span><b>path </b>-<span class="Apple-converted-space">  </span>the path where to write the help file. Default value is nil: in that case you are prompted to select a path by a dialog. After creation SC tries to reopen the file by calling undocumentedClass.openHelpFile, so the path should be searchable by SC. The file is written even if opening fails.<span class="Apple-converted-space">  </span>See <b>Helper</b>.</p>
85 <p class="p9"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></p>
86 <p class="p11"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// testing the fake class: evaluate this</p>
87 <p class="p12"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>AutoClassHelper<span class="s4">(</span>AutoClassHelperTest<span class="s4">) </span><span class="s5">// prompts for a path</span><span class="s4"><span class="Apple-converted-space"> </span></span></p>
88 <p class="p13"><span class="s4"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span></span>// in order to reopen the file choose a recognized path for help files</p>
89 <p class="p13"><span class="Apple-tab-span"> </span><span class="Apple-tab-span"> </span>// e.g. simply "Help" in the SC folder</p>
90 <p class="p7"><br></p>
91 <p class="p7"><br></p>
92 <p class="p14"><b>Examples</b></p>
93 <p class="p3"><br></p>
94 <p class="p15">// the same using Help.makeAutoHelp<span class="Apple-converted-space"> </span></p>
95 <p class="p16">Help<span class="s4">.makeAutoHelp(</span>AutoClassHelperTest<span class="s4">) </span><span class="s5">// prompts for a path</span></p>
96 </body>
97 </html>